import os,json;
def listDir(path,extensions=[],reuslts = []):
    for x in os.listdir(path):
        filepath = path+"/"+x
        if os.path.isfile(filepath):
            if len(extensions) > 0:
                for e in extensions:
                    if x.endswith("."+e):
                        reuslts.append(filepath)
                        break
            else:
                reuslts.append(filepath)
        elif os.path.isdir(filepath):
            listDir(filepath,extensions=extensions,reuslts=reuslts)
        else:
            print(f'other====:{filepath}')
    return reuslts
def dicfromFile(f):
    with open(f) as file:
        return json.loads(file.readline());
for x in [x for x in listDir("/Users/wangshuguan/Downloads/近代史") if x.startswith("/Users/wangshuguan/Downloads/近代史/courseware")]:
    print(dicfromFile(x)['data']['url']);